package com.yingpai.fitness.dvp_2_0.main.activity.dynamic;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.donkingliang.labels.LabelsView;
import com.yingpai.fitness.R;
import com.yingpai.fitness.dvp_2_0.common.activity.CommonActivity;
import com.yingpai.fitness.dvp_2_0.common.util.constant.Contacts;
import com.yingpai.fitness.dvp_2_0.main.util.DialogUtil;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * Created by ASUS on 2019/2/25.
 */

public class Dvp_2_1_PublishActivity extends CommonActivity {

    @BindView(R.id.take_photo1)
    TextView takePhoto1;
    @BindView(R.id.take_photo_ll1)
    LinearLayout takePhotoLl1;
    @BindView(R.id.photo_ll2)
    LinearLayout photoLl2;
    @BindView(R.id.take_photo2)
    TextView takePhoto2;
    @BindView(R.id.take_photo_ll2)
    LinearLayout takePhotoLl2;
    @BindView(R.id.add_shop_label)
    RelativeLayout addShopLabel;
    @BindView(R.id.shop_label)
    TextView shopLabel;
    @BindView(R.id.delete_label_rl)
    RelativeLayout deleteLabelRl;
    @BindView(R.id.location_tv)
    TextView locationTv;
    @BindView(R.id.labels)
    LabelsView labels;
    @BindView(R.id.publish)
    TextView publish;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setStatusFlag(Contacts.NORMAL_STATUS);
        setContentView(R.layout.dvp_2_1_activity_publish);
    }

    @Override
    protected void initView() {
        setTitle("发布");
    }

    @Override
    protected void initData() {

    }

    @Override
    @OnClick({R.id.take_photo1, R.id.take_photo2, R.id.add_shop_label, R.id.delete_lable, R.id.locatio_rl, R.id.publish})
    public void onViewClicked(View view) {
        super.onViewClicked(view);
        switch (view.getId()) {
            case R.id.take_photo1:
                showTakePhoto();
                break;
            case R.id.take_photo2:
                break;
            case R.id.add_shop_label:
                startActivity(SerachShopLabelActivity.class);
                break;
            case R.id.delete_lable:
                break;
            case R.id.locatio_rl:
                startActivity(SerachLocationActivity.class);
                break;
            case R.id.publish:
                break;
        }
    }


    public void showTakePhoto(){
        DialogUtil.getInstance().showBottomDialog(context,R.layout.take_photos_bottom_layout);
        LinearLayout take_photo_bottom = (LinearLayout) DialogUtil.getInstance().dialog_bottom_layout;

        take_photo_bottom.findViewById(R.id.cancel).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                DialogUtil.getInstance().dialog_bottom.dismiss();
            }
        });
    }
}
